home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / September 93.iso / Archives / Sound / Playing & Recording / Macintosh Tracker / Tracker Client Folder / CMyDocument.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-23  |  6.6 KB  |  220 lines  |  [TEXT/KAHL]

  1. /* CMyDocument.h */
  2.  
  3. #pragma once
  4.  
  5. #include "CDocument.h"
  6. #include <Aliases.h>
  7. #include <Processes.h>
  8. #include <AppleEvents.h>
  9.  
  10. class CWindow;
  11. class CArray;
  12. class CSongList;
  13. class CPicture;
  14. class CStaticText;
  15. class CCheckbox;
  16. class CNumberEdit;
  17.  
  18. class CStopButton;
  19. class CRewindButton;
  20. class CFastForwardButton;
  21. class CSkipToNextButton;
  22. class CStaticText;
  23. class CAutoNextSong;
  24. class CRepeat;
  25. class CRandomize;
  26. class CAutoStartSongs;
  27. class CDefaultStereoOn;
  28. class CDefaultAntiAliasing;
  29. class CDefaultSamplingRate;
  30. class CDefaultStereoMix;
  31. class CDefaultNumRepeats;
  32. class CDefaultSpeed;
  33. class CDefaultVolume;
  34. class CSpecificStereoOn;
  35. class CSpecificAntiAliasing;
  36. class CSpecificSamplingRate;
  37. class CSpecificStereoMix;
  38. class CSpecificNumRepeats;
  39. class CSpecificSpeed;
  40. class CSpecificVolume;
  41. class CSpecificTracker;
  42. class COverrideStereoOn;
  43. class COverrideAntiAliasing;
  44. class COverrideSamplingRate;
  45. class COverrideStereoMix;
  46. class COverrideNumRepeats;
  47. class COverrideSpeed;
  48. class COverrideVolume;
  49.  
  50. #define SongNameLength (32)
  51.  
  52. typedef struct
  53.     {
  54.         MyBoolean                SamplingRateOverrideDefault;
  55.         ushort                    SamplingRate;
  56.         MyBoolean                StereoOnOverrideDefault;
  57.         MyBoolean                StereoOn;
  58.         MyBoolean                StereoMixOverrideDefault;
  59.         short                        StereoMix;
  60.         MyBoolean                AntiAliasingOverrideDefault;
  61.         MyBoolean                AntiAliasing;
  62.         MyBoolean                SpeedOverrideDefault;
  63.         short                        Speed;
  64.         MyBoolean                NumRepeatsOverrideDefault;
  65.         short                        NumRepeats;
  66.         MyBoolean                VolumeOverrideDefault;
  67.         short                        Volume;
  68.         MyBoolean                Tracker; /* False = ours, True = Frank's */
  69.         AliasRecord**        SongLocation;
  70.         uchar                        SongName[SongNameLength];
  71.  
  72.         MyBoolean                PlayedFlag;  /* for randomize */
  73.     } SongRec;
  74.  
  75. /* possible player states */
  76. enum    {PlayerLaunching, PlayerWaitingForInit, PlayerRunning, PlayerDying};
  77.  
  78. struct    CMyDocument    :    CDocument
  79.     {
  80.         CWindow*                                RootWindow;
  81.         FSSpec                                    TheFile;
  82.         MyBoolean                                EverSaved;
  83.         MyBoolean                                UpToDate;
  84.         CArray*                                    ListOfSongs;
  85.         MyBoolean                                FileOpenFlag;
  86.         short                                        FileRef;
  87.  
  88.         ushort                                    SamplingRate;
  89.         MyBoolean                                StereoOn;
  90.         short                                        StereoMix;
  91.         MyBoolean                                AntiAliasing;
  92.         short                                        Speed;
  93.         short                                        NumRepeats;
  94.         short                                        Volume;
  95.         MyBoolean                                AutoNextSong;
  96.         MyBoolean                                Repeat;
  97.         MyBoolean                                AutoStartSongs;
  98.         MyBoolean                                Randomize;
  99.  
  100.         long                                        Selection;
  101.  
  102.         CSongList*                            SongList;
  103.         CPicture*                                PausePlayButton;
  104.         CStopButton*                        StopButton;
  105.         CRewindButton*                    RewindButton;
  106.         CFastForwardButton*            FastForwardButton;
  107.         CSkipToNextButton*            SkipToNextButton;
  108.         CAutoNextSong*                    AutoNextSongBox;
  109.         CRepeat*                                RepeatBox;
  110.         CAutoStartSongs*                AutoStartSongsBox;
  111.         CRandomize*                            RandomizeBox;
  112.         CDefaultStereoOn*                DefaultStereoOnBox;
  113.         CDefaultAntiAliasing*        DefaultAntiAliasingBox;
  114.         CDefaultSamplingRate*        DefaultSamplingRateBox;
  115.         CDefaultStereoMix*            DefaultStereoMixBox;
  116.         CDefaultNumRepeats*            DefaultNumRepeatsBox;
  117.         CDefaultSpeed*                    DefaultSpeedBox;
  118.         CDefaultVolume*                    DefaultVolumeBox;
  119.         CSpecificStereoOn*            SpecificStereoOnBox;
  120.         CSpecificAntiAliasing*    SpecificAntiAliasingBox;
  121.         CSpecificSamplingRate*    SpecificSamplingRateBox;
  122.         CSpecificStereoMix*            SpecificStereoMixBox;
  123.         CSpecificNumRepeats*        SpecificNumRepeatsBox;
  124.         CSpecificSpeed*                    SpecificSpeedBox;
  125.         CSpecificVolume*                SpecificVolumeBox;
  126.         CSpecificTracker*                SpecificTrackerBox;
  127.         CStaticText*                        SpecificSamplingRateText;
  128.         CStaticText*                        SpecificStereoMixText;
  129.         CStaticText*                        SpecificNumRepeatsText;
  130.         CStaticText*                        SpecificSpeedText;
  131.         CStaticText*                        SpecificVolumeText;
  132.         COverrideStereoOn*            OverrideStereoOnBox;
  133.         COverrideAntiAliasing*    OverrideAntiAliasingBox;
  134.         COverrideSamplingRate*    OverrideSamplingRateBox;
  135.         COverrideStereoMix*            OverrideStereoMixBox;
  136.         COverrideNumRepeats*        OverrideNumRepeatsBox;
  137.         COverrideSpeed*                    OverrideSpeedBox;
  138.         COverrideVolume*                OverrideVolumeBox;
  139.  
  140.         MyBoolean                                PlayNextWhenThisOneStops;
  141.         long                                        SongToStart;
  142.         MyBoolean                                PlayerExists;
  143.         short                                        PlayerState;
  144.         long                                        Playing; /* index of song being played */
  145.         ProcessSerialNumber            OurPlayer;
  146.  
  147.  
  148.         /* */                CMyDocument();
  149.         /* */                ~CMyDocument();
  150.         void                DoNewFile(void);
  151.         MyBoolean        GoAway(void);
  152.         void                DoPrint(void);
  153.         void                DoOpenFile(FSSpec* TheSpec);
  154.         MyBoolean        SaveFile(void);
  155.         MyBoolean        SaveFileAs(void);
  156.         void                WriteData(void);
  157.         void                AddSong(FSSpec* TheSpec);
  158.         void                CancelCurrentSong(void);
  159.         void                StartThisSong(long SongIndex);
  160.         void                RemoveSongFromList(long SongIndex);
  161.         void                MakeNewWindow(void);
  162.         void                DoIdle(long Stupid);
  163.         void                SetNewSelection(long NewSelection);
  164.         void                MoveSong(long SongIndex, long NewIndex);
  165.  
  166.         void                SetStereoOn(MyBoolean NewStereoOn);
  167.         void                SetAntiAliasing(MyBoolean NewAntiAliasing);
  168.         void                SetSamplingRate(ulong NewSamplingRate);
  169.         void                SetStereoMix(short NewStereoMix);
  170.         void                SetNumRepeats(short NewNumRepeats);
  171.         void                SetSpeed(short NewSpeed);
  172.         void                SetVolume(short NewVolume);
  173.         void                SetSpecificTracker(MyBoolean UseFrankSeide);
  174.         void                SetOverrideStereoOn(MyBoolean Flag);
  175.         void                SetOverrideAntiAliasing(MyBoolean Flag);
  176.         void                SetOverrideSamplingRate(MyBoolean Flag);
  177.         void                SetOverrideStereoMix(MyBoolean Flag);
  178.         void                SetOverrideNumRepeats(MyBoolean Flag);
  179.         void                SetOverrideSpeed(MyBoolean Flag);
  180.         void                SetOverrideVolume(MyBoolean Flag);
  181.         void                SetDefaultStereoOn(MyBoolean NewStereoOn);
  182.         void                SetDefaultAntiAliasing(MyBoolean NewAntiAliasing);
  183.         void                SetDefaultSamplingRate(ulong NewSamplingRate);
  184.         void                SetDefaultStereoMix(short NewStereoMix);
  185.         void                SetDefaultNumRepeats(short NewNumRepeats);
  186.         void                SetDefaultSpeed(short NewSpeed);
  187.         void                SetDefaultVolume(short NewVolume);
  188.  
  189.         void                SetAutoNextSong(MyBoolean NewAutoNextSong);
  190.         void                SetRepeat(MyBoolean NewRepeat);
  191.         void                SetAutoStartSongs(MyBoolean NewAutoStartSongs);
  192.         void                SetRandomize(MyBoolean NewRandomize);
  193.         void                ResetRandomPlayList(void);
  194.         void                StartRandomSong(void);
  195.  
  196.         void                SendMessage(short TheMessage, DescType TheKeyWord);
  197.  
  198.         void                DoRewind(MyBoolean Flag);
  199.         void                DoStop(void);
  200.         void                DoPlay(void);
  201.         void                DoPause(void);
  202.         void                DoFastForward(MyBoolean Flag);
  203.         void                DoSkipToNext(void);
  204.         void                DoVolumeUp(void);
  205.         void                DoVolumeDown(void);
  206.  
  207.         void                PlayerDiedNotification(void);
  208.         void                PlayerLaunchedNotification(ProcessSerialNumber TheProcNum);
  209.     };
  210.  
  211.  
  212. /* menu options */
  213. #define mDeleteSelection (0x1000)
  214. #define mPlaySelection (0x1001)
  215. #define mStopPlaying (0x1002)
  216. #define mIncreaseVolume (0x1003)
  217. #define mDecreaseVolume (0x1004)
  218. #define mShowSelection (0x1005)
  219. #define mShowPlaying (0x1006)
  220.